﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing {
    import org.aswing.geom.*;

    public class Insets {

        public var bottom:int = 0;
        public var top:int = 0;
        public var left:int = 0;
        public var right:int = 0;

        public function Insets(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){
            this.top = _arg1;
            this.left = _arg2;
            this.bottom = _arg3;
            this.right = _arg4;
        }
        public static function createIdentic(_arg1:int):Insets{
            return (new Insets(_arg1, _arg1, _arg1, _arg1));
        }

        public function addInsets(_arg1:Insets):Insets{
            this.top = (this.top + _arg1.top);
            this.left = (this.left + _arg1.left);
            this.bottom = (this.bottom + _arg1.bottom);
            this.right = (this.right + _arg1.right);
            return (this);
        }
        public function getMarginWidth():int{
            return ((this.left + this.right));
        }
        public function getMarginHeight():int{
            return ((this.top + this.bottom));
        }
        public function getInsideBounds(_arg1:IntRectangle):IntRectangle{
            var _local2:IntRectangle = _arg1.clone();
            _local2.x = (_local2.x + this.left);
            _local2.y = (_local2.y + this.top);
            _local2.width = (_local2.width - (this.left + this.right));
            _local2.height = (_local2.height - (this.top + this.bottom));
            return (_local2);
        }
        public function getOutsideBounds(_arg1:IntRectangle):IntRectangle{
            var _local2:IntRectangle = _arg1.clone();
            _local2.x = (_local2.x - this.left);
            _local2.y = (_local2.y - this.top);
            _local2.width = (_local2.width + (this.left + this.right));
            _local2.height = (_local2.height + (this.top + this.bottom));
            return (_local2);
        }
        public function getOutsideSize(_arg1:IntDimension=null):IntDimension{
            if (_arg1 == null){
                _arg1 = new IntDimension();
            };
            var _local2:IntDimension = _arg1.clone();
            _local2.width = (_local2.width + (this.left + this.right));
            _local2.height = (_local2.height + (this.top + this.bottom));
            return (_local2);
        }
        public function getInsideSize(_arg1:IntDimension=null):IntDimension{
            if (_arg1 == null){
                _arg1 = new IntDimension();
            };
            var _local2:IntDimension = _arg1.clone();
            _local2.width = (_local2.width - (this.left + this.right));
            _local2.height = (_local2.height - (this.top + this.bottom));
            return (_local2);
        }
        public function equals(_arg1:Object):Boolean{
            var _local2:Insets = (_arg1 as Insets);
            if (_local2 == null){
                return (false);
            };
            return ((((((((_local2.bottom == this.bottom)) && ((_local2.left == this.left)))) && ((_local2.right == this.right)))) && ((_local2.top == this.top))));
        }
        public function clone():Insets{
            return (new Insets(this.top, this.left, this.bottom, this.right));
        }
        public function toString():String{
            return ((((((((("Insets(top:" + this.top) + ", left:") + this.left) + ", bottom:") + this.bottom) + ", right:") + this.right) + ")"));
        }

    }
}//package org.aswing 
